Correctly handle reaching the end of the interval tree. (Bug#15344)
authorDaniel Colascione <dancol@dancol.org>
Mon, 13 Jan 2014 23:40:16 +0000 (15:40 -0800)
committerDaniel Colascione <dancol@dancol.org>
Mon, 13 Jan 2014 23:40:16 +0000 (15:40 -0800)
src/ChangeLog
src/textprop.c

index 3ecb36006a02bf4f4adc1072370ed063d562fe60..71a5063b07baed7997a9b0118b2db0ff7a9b111a 100644 (file)
@@ -1,3 +1,8 @@
+2014-01-13  Daniel Colascione  <dancol@dancol.org>
+
+       * textprop.c (Fremove_list_of_text_properties): Correctly
+       handle reaching the end of the interval tree. (Bug#15344)
+
 2014-01-13  Daniel Colascione  <dancol@dancol.org>
 
        Fix menu item updating in the presence of the Unity global menu
index 3fff8c42b338f8a31223156881477f3e6e8694e9..67f517182ea651fb35b4cca7ae4179dc8a65ea50 100644 (file)
@@ -1741,6 +1741,19 @@ Return t if any property was actually removed, nil otherwise.  */)
        }
       len -= LENGTH (i);
       i = next_interval (i);
+      if(!i)
+        {
+          if (modified)
+            {
+              if (BUFFERP (object))
+                signal_after_change (XINT (start),
+                                     XINT (end) - XINT (start),
+                                     XINT (end) - XINT (start));
+              return Qt;
+            }
+          else
+            return Qnil;
+        }
     }
 }
 \f